package com.qzimp.fujiancuo.mapper;

import com.mybatisflex.core.BaseMapper;
import com.qzimp.fujiancuo.entity.UserinfoLog;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *  映射层。
 *
 * @author 李欧雯
 * @since 2024-12-20
 */
@Service
public interface UserinfoLogMapper extends BaseMapper<UserinfoLog> {

    @Select("select id from tb_userinfo where login_name=#{username}")
    int getUserIdByName(@Param("username") String username);

    @Select("select * from tb_userinfo_log where userinfo_id = #{id}")
    List<UserinfoLog> getUserinfoLogs(@Param("id") int id);
}
